home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
TPUG Xtras
/
Masterdisks
/
vicmd.d64
/
disk copier
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2009-02-07
|
7KB
|
167 lines
100 POKE808,230:PRINTCHR$(142)"[147]":POKE56,41:CLR:RESTORE:POKE53280,1:POKE53281,1
105 PRINT" DISK DRIVE CONFIGURATION:":PRINT" 1[146] = ONE DRIVE, DEVICE #8"
110 PRINT" 2[146] = TWO DRIVES, DEVICE #8+9":PRINT"PRESS 1[146] OR 2[146] : ";
115 POKE204,0:GETC$:IFC$<"1"ORC$>"2"THEN115
120 PRINTC$:POKE204,1:PRINT"--OK, STAND-BY...":DI=VAL(C$):IFDI=1THENDR=8:DR$="8"
125 IFDI=2THENDR=9:DR$="9"
130 SP=1389:SB=10496:BP=SB:EB=40960:FORA=828TO867:READB:POKEA,B:NEXT
135 DATA 162,2,32,198,255,160,0,32,165,255,153,0,48,200,208,247,32,204,255,96
140 DATA 162,2,32,201,255,160,0,185,0,48,32,168,255,200,208,247,32,204,255,96
145 BL$=" [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]"
150 BL$=BL$+"[157][157][157][157][157][157][157]":DIMBM$(140),C(43):FORA=0TO43:READC(A):NEXT:GOSUB745
155 DATA 32,101,116,117,97,246,234,231,160,21,21,21,21,21,21,21,21,21,21,21,21
160 DATA 21,21,21,21,21,19,19,19,19,19,19,19,18,18,18,18,18,18,17,17,17,17,17
165 GETC$:PRINT"[147][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
170 IFDR=8THENPRINTSPC(10)"1 DRIVE BACKUP V5.0"
175 IFDR=9THENPRINTSPC(10)"2 DRIVE BACKUP V5.0"
180 PRINT"BY MICHAEL SCHAFF(CBM) & S.J. LYON(ISS)"
185 PRINT" *PRESS <RETURN> TO END EACH COMMAND,"
190 PRINT" EXCEPT FOR '(Y/N)' QUESTIONS*"
195 PRINT"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
200 PRINT"[213][192]BUFFER[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
205 PRINT"[194] [156] [221]"
210 PRINT"[221] E [188] [167] [190] F [221]"
215 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
220 PRINT"[213][192]DISK[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
225 PRINT"[221] [221]"
230 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
235 PRINT"[213][192]DISK STATUS[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
240 PRINT"[221] [221]"
245 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
250 PRINT"[213][192]EXECUTING[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
255 PRINT"[221] [221]"
260 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
265 PRINT"[213][192]OPERATOR'S COMMANDS[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][201]"
270 PRINT"[221] [221]"
275 PRINT"[202][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][203]"
280 B$="B":LN=1:DN=7:RT=1:PO=ASC(B$)
285 OP$="":GOSUB710:OP$="ENTER DISK NAME ABOVE & <RETURN>"
290 GOSUB725:OP$="DESTINATION =":GOSUB720:LN=16:DN=14:RT=17:GOSUB655
295 LN=2:RT=35:DN$=B$
300 PRINT"[145]"SPC(34)",":OP$="ENTER DISK ID ABOVE & <RETURN>":GOSUB725
305 GOSUB655:IFB$=""THENB$="64"
310 PRINT"[145]"SPC(35)B$:DI$=B$:POKE198,0
315 BC$="INSERT DESTINATION DISK INTO DRIVE #"+DR$+"":GOSUB900
320 GOSUB740:OP$="FORMATTING DESTINATION DISK":GOSUB710
325 OPEN15,DR,15,"I"
335 DN$="N0:"+DN$+","+DI$:PRINT#15,DN$:INPUT#15,EN$,ED$,ET$,ES$
340 CLOSE15:GOSUB730:IFEN$<>"00"THEN:OP$="":GOSUB710:GOTO290
345 OP$="":GOSUB710
350 BC$="INSERT SOURCE DISK INTO DRIVE #8":GOSUB900
355 OP$="READING BAM FROM SOURCE DISK":GOSUB710
360 OPEN15,8,15:OPEN2,8,2,"#":PRINT#15,"U1";2;0;18;0:PRINT#15,"B-P:"2;1
365 GET#2,A$,A$,A$:FORA=1TO140:GET#2,A$:IFA$=""THENA$=CHR$(0)
370 BM$(A)=A$:NEXT:INPUT#15,EN$,ED$,ET$,ES$:IFEN$<>"00"THEN920
375 PRINT#15,"B-P";2;144:SN$="":FORA=1TO20:GET#2,A$:SN$=SN$+A$:NEXT
380 CLOSE2:CLOSE15:SN$=LEFT$(SN$,16)+","+RIGHT$(SN$,2)
385 DN$=RIGHT$(DN$,LEN(DN$)-3):A$=LEFT$(DN$,LEN(DN$)-3)+" "
390 DN$=LEFT$(A$,16)+","+RIGHT$(DN$,2):GOSUB730:OP$="[156]SOURCE DISK = "+SN$
395 IFLEFT$(SN$,10)="MASTERDISK"ANDLEFT$(SN$,16)<>LEFT$(DN$,16)THENRS=1
400 IFRS=1THENOP$="":GOSUB710:GOSUB720:EN$="*9":ED$="DISK NAMES NOT IDENTICAL"
405 IFRS=1THENET$="18":ES$="00":GOSUB730:OP$="BACKUP INCOMPLETE-- START OVER "
410 IFRS=1THENGOSUB710:BC$="BAD MASTERDISK COPY-DISK NAME!":GOSUB900:GOTO100
415 IFRIGHT$(DN$,2)<>RIGHT$(SN$,2)THEN435
420 OP$="":GOSUB710:GOSUB720:EN$="*3":ED$="BAD ID NUMBER":ET$="18":ES$="00"
425 GOSUB730:OP$="BACKUP INCOMPLETE-- START OVER! [146]--":GOSUB710
430 BC$="ID NUMBERS ARE NOT UNIQUE!":GOSUB900:GOTO100
435 GOSUB720:OP$="":GOSUB710
440 BC$="VERIFY SOURCE DISK--(Y/N)":GOSUB900
445 IFA$<>"N"THEN455
450 OP$="":GOSUB710:GOSUB720:GOSUB740:GOTO350
455 OP$="READING DATA INTO BUFFER":GOSUB710
460 IFPO=68THENFORA=1TO140:BM$(A)=CHR$(0):NEXT
465 OPEN15,8,15:OPEN2,8,2,"#"
470 FORTC=1TO140STEP4:IFC(((TC-1)/4+1)+8)=ASC(BM$(TC))THEN595
475 TR=(TC-1)/4+1:BY=255-ASC(BM$(TC+1))
480 IFBYAND128THENSC=7:GOSUB765
485 IFBYAND64THENSC=6:GOSUB765
490 IFBYAND32THENSC=5:GOSUB765
495 IFBYAND16THENSC=4:GOSUB765
500 IFBYAND8THENSC=3:GOSUB765
505 IFBYAND4THENSC=2:GOSUB765
510 IFBYAND2THENSC=1:GOSUB765
515 IFBYAND1THENSC=0:GOSUB765
520 BY=255-ASC(BM$(TC+2))
525 IFBYAND128THENSC=15:GOSUB765
530 IFBYAND64THENSC=14:GOSUB765
535 IFBYAND32THENSC=13:GOSUB765
540 IFBYAND16THENSC=12:GOSUB765
545 IFBYAND8THENSC=11:GOSUB765
550 IFBYAND4THENSC=10:GOSUB765
555 IFBYAND2THENSC=9:GOSUB765
560 IFBYAND1THENSC=8:GOSUB765
565 BY=255-ASC(BM$(TC+3))
570 IF(BYAND16)ANDC(TR+8)>20THENSC=20:GOSUB765
575 IF(BYAND8)ANDC(TR+8)>19THENSC=19:GOSUB765
580 IF(BYAND4)ANDC(TR+8)>18THENSC=18:GOSUB765
585 IF(BYAND2)ANDC(TR+8)>17THENSC=17:GOSUB765
590 IF(BYAND1)ANDC(TR+8)>16THENSC=16:GOSUB765
595 NEXT:CLOSE2:CLOSE15:OP$="":GOSUB710:OP$="[156]DESTINATION DISK="+DN$:GOSUB720
600 BC$="":IFDR=8THENBC$="INSERT DESTINATION DISK INTO DRIVE #8":GOSUB900
605 GOSUB890:IFID$=RIGHT$(DN$,2)THENEN$="00":ED$="OK":GOTO615
610 EN$="*1":ED$="SOURCE ID FOUND":ET$="18":ES$="00":GOSUB730:GOTO600
615 GOSUB730:OP$="WRITING DATA FROM BUFFER":GOSUB710:GOSUB850
620 OP$="BACKUP IS FINISHED!":GOSUB710:OP$="":GOSUB740:GOSUB715:GOSUB720
625 IFDR=8THENBC$="REMOVE DESTINATION DISK FROM DRIVE":GOSUB900
630 IFDR=9THENBC$="REMOVE DISKS FROM DRIVES":GOSUB900
635 OP$="WANT ANOTHER COPY-RUN (Y/N)? ":GOSUB725
640 GETA$:IFA$<>"Y"ANDA$<>"N"THEN640
645 IFA$="Y"THEN100
650 POKE56,160:END
655 B$="":PRINTLEFT$("",DN)SPC(RT)" ";
660 PRINT"[157][209]";:FORA=1TO55:GETA$:IFA$<>""THEN670
665 NEXT:PRINT"[157][214]";:FORA=1TO55:IFA$=""THENNEXT:GOTO660
670 IFASC(A$)=13THENPRINT"[157] ":RETURN
675 IFASC(A$)=133THEN100
680 IFASC(A$)<>20THEN695
685 IFLEN(B$)=0THENNEXT:GOTO660
690 B$=LEFT$(B$,LEN(B$)-1):PRINT"[157] [157][157] ";:GOTO660
695 IFA$<" "ORA$>"Z"THENNEXT:GOTO660
700 IFLEN(B$)<LNTHENB$=B$+A$:PRINT"[157]"A$"";:GOTO660
705 NEXT:GOTO660
710 PRINT""BL$OP$:RETURN
715 PRINT""BL$OP$:RETURN
720 PRINT""BL$OP$:RETURN
725 PRINT""BL$OP$:RETURN
730 CLOSE2:CLOSE15:OP$=EN$+", "+ED$+","+ET$+","+ES$
735 PRINT""BL$OP$:RETURN
740 PRINT""BL$:RETURN
745 FORA=SBTOEBSTEP258:POKEA,0:POKEA+1,0:NEXT:BP=SB:RETURN
750 IFBR=0THENPT=PT+1:IFPT>8THENPT=1:SP=SP+1:GOTO760
755 IFBR=1THENPT=PT-1:IFPT<0THENPT=7:SP=SP-1
760 POKESP,C(PT):RETURN
765 BR=0:PRINT#15,"U1:"2;0;TR;SC:PRINT#15,"B-P:"2;0
770 POKEBP,TR:POKEBP+1,SC:BP=BP+2:HI=INT(BP/256):LO=BP-(HI*256):POKE839,LO
775 POKE840,HI:GOSUB750:SYS828:GOSUB750:INPUT#15,EN$,ED$,ET$,ES$
780 IFEN$<>"00"THEN920
785 BP=BP+256:IFBP+256<EBTHENRETURN
790 CLOSE2:CLOSE15:OP$="":GOSUB710:OP$="[156]DESTINATION DISK="+DN$:GOSUB720
795 BC$="":IFDR=8THENBC$="INSERT DESTINATION DISK INTO DRIVE #8":GOSUB900
800 GOSUB890:IFID$=RIGHT$(DN$,2)THENEN$="00":ED$="OK":GOSUB730:GOTO810
805 EN$="*1":ED$="SOURCE ID FOUND":ET$="18":ES$="00":GOSUB730:GOTO795
810 OP$="WRITING DATA FROM BUFFER":GOSUB710:GOSUB850:GOSUB745:OP$="":GOSUB710
815 OP$="[156]SOURCE DISK = "+SN$:GOSUB720
820 BC$="":IFDR=8THENBC$="INSERT SOURCE DISK INTO DRIVE #8":GOSUB900
825 OPEN15,8,15:OPEN2,8,2,"#":PRINT#15,"U1";2;0;18;0:PRINT#15,"B-P:"2;162
830 GET#2,A$,B$:CLOSE2:CLOSE15:ID$=A$+B$
835 IFID$=RIGHT$(SN$,2)THENEN$="00":ED$="OK":GOSUB730:GOTO845
840 EN$="*2":ED$="DESTINATION ID FOUND":ET$="18":ES$="00":GOSUB730:GOTO820
845 OP$="READING DATA INTO BUFFER":GOSUB710:OPEN15,8,15:OPEN2,8,2,"#":RETURN
850 BP=SB:OPEN15,DR,15:OPEN2,DR,2,"#":BR=1
855 IF(PEEK(BP)=0ANDPEEK(BP+1)=0)ORBP+256>EBTHENCLOSE15:CLOSE2:RETURN
860 TR=PEEK(BP):SC=PEEK(BP+1):IFTR=18ANDSC=0THEN880
865 PRINT#15,"B-P:"2;0:BP=BP+2:HI=INT(BP/256):LO=BP-(HI*256):POKE856,LO
870 POKE857,HI:GOSUB750:SYS848:GOSUB750:INPUT#15,EN$,ED$,ET$,ES$:IFEN$<>"00"THEN920
875 PRINT#15,"U2";2;0;TR;SC:BP=BP+256:GOTO855
880 FORA=0TO15:POKE(BP+146+A),ASC(MID$(DN$,A+1,1)):NEXT:FORA=0TO1
885 POKE(BP+164+A),ASC(MID$(DN$,18+A,1)):NEXT:GOTO865
890 OPEN15,DR,15:OPEN2,DR,2,"#":PRINT#15,"U1";2;0;18;0:PRINT#15,"B-P:"2;162
895 GET#2,A$,B$:CLOSE2:CLOSE15:ID$=A$+B$:RETURN
900 OP$=BC$:GOSUB725:FORA=1TO75:GETA$
905 IFA$=""THENNEXT:OP$="":GOSUB725:FORA=1TO75:GETA$:IFA$=""THENNEXT:GOTO900
910 OP$="":GOSUB725:IFA$<>"[133]"THENRETURN
915 GOTO100
920 GOSUB730:OP$="BACKUP INCOMPLETE-- START OVER! [146]--"
925 GOSUB710:BC$="UN-RECOVERABLE DISK ERROR!":FORCL=1TO15:CLOSECL:NEXTCL
930 GOSUB900:GOTO100